import type { RouteRecordRaw } from 'vue-router';
import { $t } from '@/locales';

function Layout() {
  return import('@/layouts/index.vue');
}

const routes: RouteRecordRaw = {
  path: '/message_management',
  component: Layout,
  redirect: '/message_management/index',
  name: 'messageManagement',
  meta: {
    title: '短信发送',
    icon: 'icon_message',
    auth: 'message_management',
  },
  children: [
    {
      path: 'index',
      name: 'messageManagementIndex',
      component: () => import('@/views/dcp/message_management/index.vue'),
      meta: {
        title: '短信发送',
        singleMenu: true,
        i18n: $t('route.dcp.managementPlatform.messageManagement'),
        auth: 'message_management_index',
        activeIcon: 'system-point',
      },
    },
  ],
};

export default routes;
